package code09_final和抽象类;

public class Car extends MotoVehicle {

	private String type; // 型号/类型

	public Car(String no, String name, String type) {
		super(no, name);
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Override
	public int calcRent(int day) {
		int sum = 0;
		if(type.equals(CarConstant.AUTO_Q3)) {
			sum = day * 500;
		}else if(type.equals("Q7")) {
			sum = day * 600;
		}else if(type.equals("X3")) {
			sum = day * 400;
		}else if(type.equals("H6")) {
			sum = day * 300;
		}
		return sum;
	}

}
